package io.adrainty.bolee.framework.commons.utils;

import cn.dev33.satoken.stp.StpLogic;

/**
 * <p>SaUtil</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description SaToken不同模块的调用工具类
 * @since 2025/8/6 10:27:48
 */
public class StpKit {

    private StpKit() {}

    public static final String CUSTOMER_TYPE = "customer";

    public static final String USER_TYPE = "user";

    public static final StpLogic CUSTOMER = new StpLogic(CUSTOMER_TYPE);

    public static final StpLogic USER = new StpLogic(USER_TYPE);

    public static StpLogic getStpLogic(String userType) {
        return userType.equals(CUSTOMER_TYPE) ? CUSTOMER : USER;
    }

}
